package com.leesche.zcsp.node.web.service.impl;

import com.leesche.zcsp.node.web.dao.SysUserPlaceDao;
import com.leesche.zcsp.node.web.model.SysUserPlace;
import com.leesche.zcsp.node.web.model.SysUserPlaceCriteria;
import com.leesche.zcsp.node.web.model.SysUserPlaceKey;
import com.leesche.zcsp.node.web.service.SysUserPlaceService;
import com.leesche.zcsp.node.web.service.impl.data.read.QuerySysUserPlaceCondition;
import com.leesche.zcsp.node.web.service.impl.data.read.SysUserPlaceDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Title: SysUserPlaceServiceImpl.java
 * @Package com.leesche.zcsp.node.service.impl
 * @Description:()
 * @author dennies yang
 * @date 2016年9月22日 下午4:28:37
 * @version V1.0
 */
@Service
@Transactional
public class SysUserPlaceServiceImpl
		extends
		BaseServiceImpl<SysUserPlace, SysUserPlaceCriteria, SysUserPlaceDto, QuerySysUserPlaceCondition, SysUserPlaceKey>
		implements SysUserPlaceService {

	@Autowired
	private SysUserPlaceDao sysUserPlaceDao;

	@Autowired
	public void setBaseDao(SysUserPlaceDao sysUserPlaceDao) {
		super.setBaseDao(sysUserPlaceDao);
	}


	@Override
	public int addBatch(List<SysUserPlace> sysUserPlaces) {
		return sysUserPlaceDao.insertBatch(sysUserPlaces);
	}

	@Override
	public int removeByUserID(Long userid) {
		return sysUserPlaceDao.deleteByUserID(userid);
	}
}
